import React from 'react';
import { inject, observer } from 'mobx-react';
import './index.scss';
import { NavLink, withRouter } from 'react-router-dom';

import ImageLoader from '../../../../107/src/pages/Editor/node_modules/@src/imgs/ImageLoader'

//共用才提取 
@inject('meetingStore')
@observer
class MeetingNav extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
            navList: [{
                title: '我的会议',
                pathTo: 'Create',
                target: ''
            },{
                title: '创会',
                pathTo: 'Create',
                target: ''
            },  {
                title: '会场管理',
                pathTo: 'MyList',
                target: ''
            }]
        };
    }

    componentWillMount() {

    }

    //入口点击事件
    handlerEntryEachClick = (item) => {
        console.log(this.props.match.url, "==========this.props.match.url===========");
        console.log(item, "==========item===========");

        this.props.history.push(this.props.match.url + item.pathTo);
    }

    render() {
        var wrapCls = "MeetingNav nav_wrap " + this.props.className;
        return (
            <ul className={wrapCls}>
                {
                    this.state.navList.map((item, index) => {
                        return (
                            <li kye={index} className="nav_each" onClick={() => { this.handlerEntryEachClick(item) }}>
                                {item.title}
                            </li>
                        )
                    })
                }
            </ul>
        );
    }
}
export default withRouter(MeetingNav);